import http from '@/utils/http';

export const proposalApi = {
  // 获取文档列表
  getDocsList: (params: Record<string, any>) => {
    return http.get('/docs/list', { params });
  },

  // 获取文档详情
  getDocsDetail: (id: number | string) => {
    return http.get(`/docs/${id}`);
  },

  // 创建新文档
  createDocs: (data: Record<string, any>) => {
    return http.post('/docs', data);
  },

  // 更新文档
  updateDocs: (id: number | string, data: Record<string, any>) => {
    return http.put(`/docs/${id}`, data);
  },

  // 删除文档
  removeDocs: (id: number | string) => {
    return http.delete(`/docs/${id}`);
  },

  // 获取文档版本列表
  deleteDocs: (id: number | string) => {
    return http.delete(`/docs/delete/${id}`);
  }
}




